package com.doyled.jump.animation;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;

public class TextAnimation extends Animation {

	private String text;
	

	public String getText() {
		return text;
	}

	public TextAnimation() {
	}

	public void setAnimation(int time, String text) {
		this.text = text;
		this.second = time;
		this.totalFrames = 60 * this.second;
		this.frame = 0;
		this.animatingFlag = true;
	}

	/**
	 * animating in a specific set time animatingFlag is true for animating and
	 * animatingFlag is false for not animating
	 */
	@Override
	public void tick() {
		if (this.animatingFlag == true) {
			if(frame < totalFrames){
				frame ++;
			} else {
				this.animatingFlag = false;
			}
		}
	}

	@Override
	public void render(Graphics g) {
	}
}
